home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / Disasm Hack / Disasm Stack / card_2833.txt < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.7 KB  |  82 lines

  1. -- card: 2833 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2794
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on appleEvent
  8.   global gFileName
  9.  
  10.   if gFileName is empty then
  11.     beep
  12.     answer "No output file has been opened!"&return&return& "Use the ‚ÄúLog to File‚Äù button."
  13.   else
  14.     request appleevent data of keyword "info"
  15.     put number of lines in it into X
  16.     write line 1 to x-3 of it to file gFileName
  17.   end if
  18. end appleEvent
  19.  
  20.  
  21. on UpdateBtns
  22.   global gFileName
  23.   set the visible of cd btn "log to file" to (gFileName="")
  24.   set the visible of cd btn "close file"  to (gFileName‚â†"")
  25. end UpdateBtns
  26.  
  27. on opencard
  28.   UpdateBtns
  29. end opencard
  30.  
  31.  
  32. -- part 2 (button)
  33. -- low flags: 00
  34. -- high flags: A004
  35. -- rect: left=41 top=257 right=294 bottom=161
  36. -- title width / last selected line: 0
  37. -- icon id / first selected line: 0 / 0
  38. -- text alignment: 1
  39. -- font id: 0
  40. -- text size: 12
  41. -- style flags: 0
  42. -- line height: 16
  43. -- part name: Log to File
  44. ----- HyperTalk script -----
  45. on mouseUp
  46.   ask file "Log to what file?"
  47.   if it ‚↠"" then
  48.  
  49.     global gFileName
  50.     put it into gFileName
  51.     open file gFilename
  52.   end if
  53.  
  54.   UpdateBtns
  55. end mouseUp
  56.  
  57.  
  58. -- part 3 (button)
  59. -- low flags: 80
  60. -- high flags: A004
  61. -- rect: left=186 top=257 right=294 bottom=306
  62. -- title width / last selected line: 0
  63. -- icon id / first selected line: 0 / 0
  64. -- text alignment: 1
  65. -- font id: 0
  66. -- text size: 12
  67. -- style flags: 0
  68. -- line height: 16
  69. -- part name: Close File
  70. ----- HyperTalk script -----
  71. on mouseUp
  72.   set cursor to 4
  73.   global gFileName
  74.   close file gFileName
  75.  
  76.   put gFileName into thePath
  77.   put empty into gFileName
  78.   UpdateBtns
  79.  
  80.   answer "The file was created:"&return &return &thePath
  81. end mouseUp
  82.